package com.liuzu.esys.controller;


import com.liuzu.esys.common.R;
import com.liuzu.esys.pojo.Admin;
import com.liuzu.esys.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@RestController
@RequestMapping("/admin")
public class AdminController {

    @Autowired
    private AdminService adminService;

    @RequestMapping("/login")
    public R login(String name, String password, HttpServletResponse response, HttpServletRequest request){
        System.out.println("接口访问到");
//        Admin admin = adminService.login(name, password);
//        //System.out.println(admin);
//        if (name.equals(admin.getName()) && password.equals(admin.getPassword())){
//            return R.ok().data("admin",admin);
//        }else {
//            return R.error();
//        }
        return R.ok();
    }
}
